﻿using System.Text.RegularExpressions;

namespace WidgetsDesign.API.Helper
{
    public class RegexHelper
    {
        public static bool IsEmail(string emailAddress)
        {
            // 电子邮件验证的正则表达式
            string pattern = @"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$";
            return Regex.IsMatch(emailAddress, pattern);
        }
    }
}
